package com.sumi.erp.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sumi.common.annotation.Excel;
import com.sumi.common.core.domain.BaseEntity;

/**
 * 销售订单对象 order_sale
 * 
 * @author fgf67@163.com
 * @date 2024-06-21
 */
public class OrderSale extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 销售单id */
    private Long id;

    /** 公司父级id */
    @Excel(name = "公司父级id")
    private Long blocId;

    /** 公司id */
    @Excel(name = "公司id")
    private Long sellerId;

    /** 单据类型id */
    @Excel(name = "单据类型id")
    private Long docTypeId;

    /** 订单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date saleDate;

    /** 订单key */
    @Excel(name = "订单key")
    private String saleKey;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long status;

    /** 客户id */
    @Excel(name = "客户id")
    private Long partnerId;

    /** 销售代表部门id */
    @Excel(name = "销售代表部门id")
    private Long departmentId;

    /** 销售代表id */
    @Excel(name = "销售代表id")
    private Long workerId;

    /** 销售给某部门id */
    @Excel(name = "销售给某部门id")
    private Long saleDepartmentId;

    /** 业务类型 */
    @Excel(name = "业务类型")
    private String businessType;

    /** 支付类型 */
    @Excel(name = "支付类型")
    private Long payType;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalOrderAmount;

    /** 预收款总金额 */
    @Excel(name = "预收款总金额")
    private BigDecimal totalDepositAmount;

    /** 已收款总金额 */
    @Excel(name = "已收款总金额")
    private BigDecimal totalReceiveAmount;

    /** 下单方式（报价生成、采购生成、订单复制、塑米城订单） */
    @Excel(name = "下单方式", readConverterExp = "报=价生成、采购生成、订单复制、塑米城订单")
    private String orderMethod;

    /** 单位 */
    @Excel(name = "单位")
    private String uom;

    /** 币种 */
    @Excel(name = "币种")
    private String currency;

    /** 币种汇率 */
    @Excel(name = "币种汇率")
    private BigDecimal currencyRate;

    /** 税率 */
    @Excel(name = "税率")
    private BigDecimal taxRate;

    /** 审核确认时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核确认时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /** 创建人id */
    @Excel(name = "创建人id")
    private Long createUid;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setBlocId(Long blocId) 
    {
        this.blocId = blocId;
    }

    public Long getBlocId() 
    {
        return blocId;
    }
    public void setSellerId(Long sellerId) 
    {
        this.sellerId = sellerId;
    }

    public Long getSellerId() 
    {
        return sellerId;
    }
    public void setDocTypeId(Long docTypeId) 
    {
        this.docTypeId = docTypeId;
    }

    public Long getDocTypeId() 
    {
        return docTypeId;
    }
    public void setSaleDate(Date saleDate) 
    {
        this.saleDate = saleDate;
    }

    public Date getSaleDate() 
    {
        return saleDate;
    }
    public void setSaleKey(String saleKey) 
    {
        this.saleKey = saleKey;
    }

    public String getSaleKey() 
    {
        return saleKey;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setPartnerId(Long partnerId) 
    {
        this.partnerId = partnerId;
    }

    public Long getPartnerId() 
    {
        return partnerId;
    }
    public void setDepartmentId(Long departmentId) 
    {
        this.departmentId = departmentId;
    }

    public Long getDepartmentId() 
    {
        return departmentId;
    }
    public void setWorkerId(Long workerId) 
    {
        this.workerId = workerId;
    }

    public Long getWorkerId() 
    {
        return workerId;
    }
    public void setSaleDepartmentId(Long saleDepartmentId) 
    {
        this.saleDepartmentId = saleDepartmentId;
    }

    public Long getSaleDepartmentId() 
    {
        return saleDepartmentId;
    }
    public void setBusinessType(String businessType) 
    {
        this.businessType = businessType;
    }

    public String getBusinessType() 
    {
        return businessType;
    }
    public void setPayType(Long payType) 
    {
        this.payType = payType;
    }

    public Long getPayType() 
    {
        return payType;
    }
    public void setTotalOrderAmount(BigDecimal totalOrderAmount) 
    {
        this.totalOrderAmount = totalOrderAmount;
    }

    public BigDecimal getTotalOrderAmount() 
    {
        return totalOrderAmount;
    }
    public void setTotalDepositAmount(BigDecimal totalDepositAmount) 
    {
        this.totalDepositAmount = totalDepositAmount;
    }

    public BigDecimal getTotalDepositAmount() 
    {
        return totalDepositAmount;
    }
    public void setTotalReceiveAmount(BigDecimal totalReceiveAmount) 
    {
        this.totalReceiveAmount = totalReceiveAmount;
    }

    public BigDecimal getTotalReceiveAmount() 
    {
        return totalReceiveAmount;
    }
    public void setOrderMethod(String orderMethod) 
    {
        this.orderMethod = orderMethod;
    }

    public String getOrderMethod() 
    {
        return orderMethod;
    }
    public void setUom(String uom) 
    {
        this.uom = uom;
    }

    public String getUom() 
    {
        return uom;
    }
    public void setCurrency(String currency) 
    {
        this.currency = currency;
    }

    public String getCurrency() 
    {
        return currency;
    }
    public void setCurrencyRate(BigDecimal currencyRate) 
    {
        this.currencyRate = currencyRate;
    }

    public BigDecimal getCurrencyRate() 
    {
        return currencyRate;
    }
    public void setTaxRate(BigDecimal taxRate) 
    {
        this.taxRate = taxRate;
    }

    public BigDecimal getTaxRate() 
    {
        return taxRate;
    }
    public void setApprovalTime(Date approvalTime) 
    {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() 
    {
        return approvalTime;
    }
    public void setCreateUid(Long createUid) 
    {
        this.createUid = createUid;
    }

    public Long getCreateUid() 
    {
        return createUid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("blocId", getBlocId())
            .append("sellerId", getSellerId())
            .append("docTypeId", getDocTypeId())
            .append("saleDate", getSaleDate())
            .append("saleKey", getSaleKey())
            .append("status", getStatus())
            .append("partnerId", getPartnerId())
            .append("departmentId", getDepartmentId())
            .append("workerId", getWorkerId())
            .append("saleDepartmentId", getSaleDepartmentId())
            .append("businessType", getBusinessType())
            .append("payType", getPayType())
            .append("totalOrderAmount", getTotalOrderAmount())
            .append("totalDepositAmount", getTotalDepositAmount())
            .append("totalReceiveAmount", getTotalReceiveAmount())
            .append("orderMethod", getOrderMethod())
            .append("uom", getUom())
            .append("currency", getCurrency())
            .append("currencyRate", getCurrencyRate())
            .append("taxRate", getTaxRate())
            .append("remark", getRemark())
            .append("approvalTime", getApprovalTime())
            .append("createTime", getCreateTime())
            .append("createUid", getCreateUid())
            .toString();
    }
}
